/*
 * uarty.h
 *
 *  Created on: Apr 12, 2012
 *      Author: Mirek Gorczakowski
 *      Comment: Obsluga przerwania z UART (odbior informacji)
 */

#include "uarty.h"
#include "usart.h"
#include "frame.h"
#include "ledy.h"

__attribute__((__interrupt__)) void uartIntHandler (void)
{
	if (g_oFlags.u8_MasterSlave && USART_SUCCESS == usart_read_char((&AVR32_USART0), &(g_oIncomingFrame.i32_MsgRaw)))
		g_oIncomingFrame.u16_MsgIsFresh = 1;
	else
		g_oIncomingFrame.u16_MsgIsFresh = 0;
}
